package com.wxproject.demo.Service.impl;
import com.wxproject.demo.Entity.UserEntity;
import com.wxproject.demo.Mapper.RoleMapper;
import com.wxproject.demo.Service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    RoleMapper roleMapper;

    @Override
    public String getPassword(String username) {
        return roleMapper.getPassword(username);
    }

    @Override
    public String getRole(String username) {
        return roleMapper.getRole(username);
    }

    @Override
    public void updatePassword(String username, String newPassword) {
        roleMapper.updatePassword(username,newPassword);
    }

    @Override
    public List<String> getUser() {
        return roleMapper.getUser();
    }

    @Override
    public void banUser(String username) {
        roleMapper.banUser(username);
    }

    @Override
    public int checkUserBanStatus(String username) {
        return roleMapper.checkUserBanStatus(username);
    }

    @Override
    public String getRolePermission(String username) {
        return roleMapper.getRolePermission(username);
    }

    @Override
    public String getPermission(String username) {
        return roleMapper.getPermission(username);
    }

    @Override
    public Integer register(UserEntity userEntity) {
        return roleMapper.register(userEntity);
    }

}
